package com.itheima.stock.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * ClassName: PasswordEncoderConfiguration
 * Package: com.itheima.stock.config
 * Description: 密码加密配置类
 *
 * @Author Lee
 * @Create 2024/10/30
 */
@Configuration
public class    PasswordEncoderConfiguration {

    /***
     * 将PasswordEncoder  放入Spring的IOC容器
     * @return
     */
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
